package com.wisdomparking.dao;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.wisdomparking.bean.Orders;
import com.wisdomparking.dao.mapper.OrdersMapper;

@Component
public class OrdersDao implements OrdersMapper {
	
	@Autowired OrdersMapper ordersMapper;
	
	@Transactional
	@Override
	public int deleteByPrimaryKey(Integer id) {
		return ordersMapper.deleteByPrimaryKey(id);
	}
	
	@Transactional
	@Override
	public int insert(Orders record) {
		return ordersMapper.insert(record);
	}
	
	@Transactional
	@Override
	public int insertSelective(Orders record) {
		return ordersMapper.insertSelective(record);
	}
	
	@Override
	public Orders selectByPrimaryKey(Integer id) {
		return ordersMapper.selectByPrimaryKey(id);
	}
	
	@Override
	public Orders selectByOrdersNumber(String orderNumber){
		return ordersMapper.selectByOrdersNumber(orderNumber);
	}
	
	@Transactional
	@Override
	public int updateByPrimaryKeySelective(Orders record) {
		return ordersMapper.updateByPrimaryKeySelective(record);
	}
	
	@Transactional
	@Override
	public int updateByPrimaryKey(Orders record) {
		return ordersMapper.updateByPrimaryKey(record);
	}
	
	@Override
	public List<Orders> getOrdersList(Map<String, Object> map) {
		return ordersMapper.getOrdersList(map);
	}

	@Override
	public long getCountByOrders(Map<String, Object> map) {
		return ordersMapper.getCountByOrders(map);
	}

}
